<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>社交网站活动管理页面</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/css/bootstrap/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    :root {
      --primary: #4F46E5;
      --secondary: #6B7280;
      --light: #F9FAFB;
      --dark: #1F2937;
      --white: #FFFFFF;
      --success: #10B981;
      --danger: #EF4444;
      --border: #E5E7EB;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
      
      /* 不同风格主题色 */
      --style1: #3B82F6; /* 科技蓝 */
      --style2: #EC4899; /* 活力粉 */
      --style3: #10B981; /* 生态绿 */
      --style4: #F59E0B; /* 温暖橙 */
      --style5: #8B5CF6; /* 梦幻紫 */
      --style6: #111827; /* 商务黑 */
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: #f5f5f5;
      color: var(--dark);
      min-height: 100vh;
      padding: 0;
      margin: 0;
      transition: background-color 0.3s ease;
    }
    
    .container {
      max-width: 420px;
      margin: 0 auto;
      background-color: var(--white);
      min-height: 100vh;
      box-shadow: var(--shadow);
      overflow: hidden;
      position: relative;
      transition: background-color 0.3s ease;
    }
    
    /* 主页面容器 */
    .event-page {
      display: none;
      min-height: 100vh;
      flex-direction: column;
    }
    
    .event-page.active {
      display: flex;
      animation: fadeIn 0.3s ease forwards;
    }
    
    /* 顶部导航栏 */
    .page-header {
      padding: 18px 20px;
      position: relative;
      text-align: center;
      border-bottom: 1px solid var(--border);
      background-color: var(--white);
      transition: all 0.3s ease;
      z-index: 10;
    }
    
    .page-title {
      font-size: 18px;
      font-weight: 600;
      margin: 0;
    }
    
    .header-back {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: var(--dark);
      font-size: 20px;
      cursor: pointer;
      transition: color 0.3s ease, transform 0.2s ease;
    }
    
    .header-back:active {
      transform: translateY(-50%) scale(0.9);
    }
    
    .header-actions {
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
    }
    
    .header-btn {
      background: none;
      border: none;
      color: var(--dark);
      font-size: 18px;
      cursor: pointer;
      margin-left: 15px;
      transition: color 0.3s ease, transform 0.2s ease;
    }
    
    .header-btn:active {
      transform: scale(0.9);
    }
    
    /* 工具栏 */
    .event-toolbar {
      padding: 12px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--border);
      background-color: var(--white);
      transition: all 0.3s ease;
    }
    
    .toolbar-search {
      flex-grow: 1;
      position: relative;
      max-width: 240px;
    }
    
    .toolbar-search input {
      width: 100%;
      padding: 8px 12px 8px 36px;
      border-radius: 20px;
      border: 1px solid var(--border);
      font-size: 14px;
      background-color: var(--light);
      transition: all 0.2s ease;
    }
    
    .toolbar-search input:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    }
    
    .toolbar-search i {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--secondary);
      font-size: 14px;
    }
    
    .create-btn {
      padding: 8px 16px;
      background-color: var(--primary);
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      display: flex;
      align-items: center;
      cursor: pointer;
      transition: background-color 0.2s ease, transform 0.2s ease;
    }
    
    .create-btn i {
      margin-right: 6px;
    }
    
    .create-btn:active {
      transform: scale(0.95);
    }
    
    /* 分类栏 */
    .category-bar {
      padding: 0;
      background-color: var(--white);
      border-bottom: 1px solid var(--border);
      transition: all 0.3s ease;
    }
    
    .category-tabs {
      display: flex;
      overflow-x: auto;
      scrollbar-width: none;
    }
    
    .category-tabs::-webkit-scrollbar {
      display: none;
    }
    
    .category-tab {
      padding: 12px 20px;
      font-size: 15px;
      font-weight: 500;
      color: var(--secondary);
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      position: relative;
    }
    
    .category-tab.active {
      color: var(--primary);
    }
    
    .category-tab:hover {
      background-color: var(--light);
    }
    
    /* 活动列表 */
    .event-list {
      flex-grow: 1;
      overflow-y: auto;
      transition: background-color 0.3s ease;
    }
    
    .event-item {
      padding: 15px 20px;
      border-bottom: 1px solid var(--border);
      transition: background-color 0.2s ease, transform 0.2s ease;
      position: relative;
      overflow: hidden;
    }
    
    .event-item:active {
      transform: scale(0.995);
    }
    
    .event-header {
      margin-bottom: 10px;
    }
    
    .event-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 5px;
      color: var(--dark);
    }
    
    .event-meta {
      display: flex;
      font-size: 12px;
      color: var(--secondary);
      margin-bottom: 8px;
    }
    
    .event-meta div {
      display: flex;
      align-items: center;
      margin-right: 15px;
    }
    
    .event-meta i {
      margin-right: 4px;
      font-size: 12px;
    }
    
    .event-media {
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 10px;
      position: relative;
    }
    
    .event-image {
      width: 100%;
      display: block;
      transition: transform 0.3s ease;
    }
    
    .event-item:hover .event-image {
      transform: scale(1.02);
    }
    
    .event-host {
      display: flex;
      align-items: center;
      margin-bottom: 10px;
      font-size: 13px;
    }
    
    .host-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      object-fit: cover;
      margin-right: 6px;
    }
    
    .event-description {
      font-size: 14px;
      color: var(--dark);
      line-height: 1.4;
      margin-bottom: 10px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    
    .event-stats {
      display: flex;
      font-size: 12px;
      color: var(--secondary);
      margin-bottom: 10px;
    }
    
    .event-stats div {
      display: flex;
      align-items: center;
      margin-right: 15px;
    }
    
    .event-stats i {
      margin-right: 4px;
    }
    
    .event-actions {
      display: flex;
      justify-content: space-between;
    }
    
    .event-btn {
      padding: 6px 12px;
      border-radius: 4px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .join-btn {
      background-color: var(--primary);
      color: white;
      border: none;
    }
    
    .join-btn:hover {
      background-color: rgba(79, 70, 229, 0.9);
    }
    
    .join-btn:active {
      transform: scale(0.95);
    }
    
    .share-btn {
      background-color: transparent;
      color: var(--primary);
      border: 1px solid var(--primary);
    }
    
    .share-btn:hover {
      background-color: rgba(79, 70, 229, 0.1);
    }
    
    .share-btn:active {
      transform: scale(0.95);
    }
    
    /* 下拉刷新 */
    .refresh-control {
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--secondary);
      font-size: 14px;
    }
    
    .refresh-spinner {
      animation: spin 1s linear infinite;
      margin-right: 6px;
    }
    
    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    
    /* 空状态 */
    .empty-state {
      padding: 60px 20px;
      text-align: center;
      color: var(--secondary);
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    
    .empty-icon {
      font-size: 60px;
      margin-bottom: 20px;
      opacity: 0.3;
      animation: float 3s ease-in-out infinite;
    }
    
    @keyframes float {
      0% { transform: translateY(0px); }
      50% { transform: translateY(-10px); }
      100% { transform: translateY(0px); }
    }
    
    .empty-text {
      font-size: 16px;
      margin-bottom: 20px;
    }
    
    .empty-action {
      padding: 10px 20px;
      background-color: var(--primary);
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .empty-action i {
      margin-right: 6px;
    }
    
    .empty-action:active {
      transform: scale(0.95);
    }
    
    /* 样式切换器 */
    .style-switcher {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1010;
      background-color: white;
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
      width: 180px;
      transition: all 0.3s ease;
      transform: translateX(0);
      opacity: 1;
    }
    
    .style-switcher.hidden {
      transform: translateX(200px);
      opacity: 0;
      pointer-events: none;
    }
    
    .switcher-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1020;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow);
      border: none;
      font-size: 18px;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .switcher-header {
      padding: 10px 16px;
      font-size: 14px;
      font-weight: 600;
      border-bottom: 1px solid #eee;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .switcher-close {
      background: none;
      border: none;
      color: var(--secondary);
      font-size: 16px;
      cursor: pointer;
    }
    
    .switcher-option {
      padding: 12px 16px;
      font-size: 14px;
      cursor: pointer;
      transition: background-color 0.2s;
      display: flex;
      align-items: center;
    }
    
    .switcher-color {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      margin-right: 10px;
    }
    
    .switcher-option:hover {
      background-color: #f9f9f9;
    }
    
    .switcher-option.active {
      background-color: var(--primary);
      color: white;
    }
    
    /* 风格1：科技蓝 */
    .style-1 {
      --primary: var(--style1);
    }
    
    .style-1 .category-tab.active {
      border-bottom: 3px solid var(--primary);
    }
    
    .style-1 .event-item {
      transition: all 0.3s ease;
    }
    
    .style-1 .event-item:hover {
      background-color: rgba(59, 130, 246, 0.03);
    }
    
    /* 风格2：活力粉 */
    .style-2 {
      --primary: var(--style2);
    }
    
    .style-2 .page-header {
      background: linear-gradient(45deg, var(--primary), #F472B6);
      color: white;
      border-bottom: none;
      box-shadow: 0 2px 15px rgba(236, 72, 153, 0.2);
    }
    
    .style-2 .header-back,
    .style-2 .header-btn,
    .style-2 .page-title {
      color: white;
    }
    
    .style-2 .event-item {
      border-radius: 12px;
      margin: 10px;
      border-bottom: none;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    }
    
    .style-2 .event-list {
      background-color: #FAFAFA;
      padding-top: 5px;
    }
    
    .style-2 .category-bar {
      background-color: white;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    }
    
    .style-2 .category-tab.active {
      color: var(--primary);
      font-weight: 600;
      position: relative;
    }
    
    .style-2 .category-tab.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background-color: var(--primary);
    }
    
    /* 风格3：生态绿 */
    .style-3 {
      --primary: var(--style3);
    }
    
    .style-3 .container {
      background-color: #F8FAFC;
    }
    
    .style-3 .event-toolbar {
      background-color: white;
      margin: 10px;
      border-radius: 10px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      border-bottom: none;
    }
    
    .style-3 .category-tab {
      font-size: 14px;
      position: relative;
    }
    
    .style-3 .category-tab.active {
      font-weight: 600;
    }
    
    .style-3 .category-tab.active::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 8px;
      transform: translateY(-50%);
      width: 3px;
      height: 16px;
      border-radius: 3px;
      background-color: var(--primary);
    }
    
    /* 风格4：温暖橙 */
    .style-4 {
      --primary: var(--style4);
    }
    
    .style-4 .page-header {
      background-color: white;
      border-bottom: none;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .style-4 .event-item {
      border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .style-4 .event-title {
      color: var(--primary);
    }
    
    .style-4 .event-media {
      border-radius: 12px;
      overflow: hidden;
    }
    
    /* 风格5：梦幻紫 */
    .style-5 {
      --primary: var(--style5);
    }
    
    .style-5 .container {
      background-color: #FCFAFF;
    }
    
    .style-5 .event-item {
      padding: 18px 20px;
    }
    
    .style-5 .event-meta {
      color: #9333EA;
    }
    
    .style-5 .event-title {
      color: #4C1D95;
    }
    
    .style-5 .event-media {
      border-radius: 16px;
      margin: 12px 0;
      box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
    }
    
    .style-5 .category-tab {
      font-weight: 500;
      color: #6B7280;
    }
    
    .style-5 .category-tab.active {
      color: var(--primary);
      font-weight: 600;
    }
    
    /* 风格6：商务黑 */
    .style-6 {
      --primary: #60A5FA;
      --secondary: #9CA3AF;
      --light: #1F2937;
      --dark: #F9FAFB;
      --white: #111827;
      --border: #374151;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .style-6 body {
      background-color: #030712;
    }
    
    .style-6 .container {
      background-color: var(--white);
    }
    
    .style-6 .page-header {
      background-color: var(--light);
      border-bottom-color: var(--border);
    }
    
    .style-6 .header-back,
    .style-6 .header-btn,
    .style-6 .page-title {
      color: var(--dark);
    }
    
    .style-6 .event-item {
      border-bottom-color: var(--border);
    }
    
    .style-6 .event-item:hover {
      background-color: rgba(255, 255, 255, 0.05);
    }
    
    .style-6 .event-title,
    .style-6 .event-description {
      color: #E5E7EB;
    }
    
    .style-6 .toolbar-search input {
      background-color: var(--light);
      border-color: var(--border);
      color: var(--dark);
    }
    
    .style-6 .style-switcher {
      background-color: var(--light);
    }
    
    .style-6 .switcher-header {
      border-bottom-color: var(--border);
      color: var(--dark);
    }
    
    .style-6 .switcher-option {
      color: var(--dark);
    }
    
    .style-6 .switcher-option:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* 动画效果 */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    /* 滑动删除层 */
    .slide-delete {
      position: absolute;
      top: 0;
      right: 0;
      height: 100%;
      width: 80px;
      background-color: var(--danger);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 16px;
      cursor: pointer;
      transform: translateX(100%);
      transition: transform 0.3s ease;
    }
    
    .slide-delete.active {
      transform: translateX(0);
    }
    
    /* 响应式调整 */
    @media (max-width: 360px) {
      .event-btn span {
        display: none;
      }
      
      .event-btn i {
        margin-right: 0;
      }
      
      .create-btn span {
        display: none;
      }
      
      .create-btn i {
        margin-right: 0;
      }
    }
  </style>
</head>
<body class="style-1">
  <!-- 样式切换器 -->
  <button class="switcher-toggle">
    <i class="fa fa-paint-brush"></i>
  </button>
  
  <div class="style-switcher hidden">
    <div class="switcher-header">
      选择活动管理样式
      <button class="switcher-close"><i class="fa fa-times"></i></button>
    </div>
    <div class="switcher-option active" data-style="1">
      <span class="switcher-color" style="background-color: var(--style1);"></span>
      科技蓝
    </div>
    <div class="switcher-option" data-style="2">
      <span class="switcher-color" style="background-color: var(--style2);"></span>
      活力粉
    </div>
    <div class="switcher-option" data-style="3">
      <span class="switcher-color" style="background-color: var(--style3);"></span>
      生态绿
    </div>
    <div class="switcher-option" data-style="4">
      <span class="switcher-color" style="background-color: var(--style4);"></span>
      温暖橙
    </div>
    <div class="switcher-option" data-style="5">
      <span class="switcher-color" style="background-color: var(--style5);"></span>
      梦幻紫
    </div>
    <div class="switcher-option" data-style="6">
      <span class="switcher-color" style="background-color: var(--style6);"></span>
      商务黑
    </div>
  </div>
  
  <div class="container">
    <!-- 风格1：科技蓝 - 科技活动管理 -->
    <div class="event-page active" id="page1">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">科技活动</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-calendar"></i></button>
          <button class="header-btn"><i class="fa fa-user-o"></i></button>
        </div>
      </div>
      
      <div class="event-toolbar">
        <div class="toolbar-search">
          <i class="fa fa-search"></i>
          <input type="text" placeholder="搜索科技活动...">
        </div>
        <button class="create-btn">
          <i class="fa fa-plus"></i>
          <span>创建</span>
        </button>
      </div>
      
      <div class="category-bar">
        <div class="category-tabs">
          <div class="category-tab active">全部</div>
          <div class="category-tab">讲座</div>
          <div class="category-tab">研讨会</div>
          <div class="category-tab">工作坊</div>
          <div class="category-tab">展览</div>
          <div class="category-tab">线上活动</div>
        </div>
      </div>
      
      <div class="event-list">
        <div class="refresh-control">
          <i class="fa fa-refresh"></i>
          <span>下拉刷新</span>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">2023人工智能前沿技术峰会</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-15</div>
              <div><i class="fa fa-map-marker"></i> 北京国际会议中心</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/1/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/64/100/100" alt="主办方头像" class="host-avatar">
            <span>人工智能学会 主办</span>
          </div>
          
          <div class="event-description">
            本次峰会汇聚全球AI领域顶尖专家，共同探讨大语言模型、计算机视觉等前沿技术的发展趋势与应用场景，以及AI伦理与治理等重要议题。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 528人已报名</div>
            <div><i class="fa fa-eye"></i> 1256人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">Web3.0与元宇宙开发者大会</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-22</div>
              <div><i class="fa fa-map-marker"></i> 上海科技馆</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/2/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/91/100/100" alt="主办方头像" class="host-avatar">
            <span>区块链技术联盟 主办</span>
          </div>
          
          <div class="event-description">
            聚焦Web3.0生态系统构建与元宇宙应用开发，包含技术分享、实战工作坊和项目路演等环节，适合开发者、创业者和投资人参与。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 342人已报名</div>
            <div><i class="fa fa-eye"></i> 987人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">开源技术贡献者工作坊</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-18</div>
              <div><i class="fa fa-laptop"></i> 线上活动</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/3/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/26/100/100" alt="主办方头像" class="host-avatar">
            <span>开源社区联盟 主办</span>
          </div>
          
          <div class="event-description">
            面向初学者的开源贡献入门工作坊，将介绍如何参与开源项目、提交PR、处理issues等实用技能，帮助更多开发者加入开源社区。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 186人已报名</div>
            <div><i class="fa fa-eye"></i> 532人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 风格2：活力粉 - 时尚活动管理 -->
    <div class="event-page" id="page2">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">时尚活动</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-camera"></i></button>
          <button class="header-btn"><i class="fa fa-heart-o"></i></button>
        </div>
      </div>
      
      <div class="event-toolbar">
        <div class="toolbar-search">
          <i class="fa fa-search"></i>
          <input type="text" placeholder="搜索时尚活动...">
        </div>
        <button class="create-btn">
          <i class="fa fa-plus"></i>
          <span>创建</span>
        </button>
      </div>
      
      <div class="category-bar">
        <div class="category-tabs">
          <div class="category-tab active">全部</div>
          <div class="category-tab">时装秀</div>
          <div class="category-tab">美妆课</div>
          <div class="category-tab">摄影展</div>
          <div class="category-tab">派对</div>
          <div class="category-tab">发布会</div>
        </div>
      </div>
      
      <div class="event-list">
        <div class="refresh-control">
          <i class="fa fa-refresh"></i>
          <span>下拉刷新</span>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">2023秋季时装周</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-10至15日</div>
              <div><i class="fa fa-map-marker"></i> 上海时装中心</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/21/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/65/100/100" alt="主办方头像" class="host-avatar">
            <span>时尚协会 主办</span>
          </div>
          
          <div class="event-description">
            汇集国内外知名设计师品牌的秋季新品发布会，展示最新潮流趋势，现场将有模特走秀、设计师分享和互动体验环节。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 856人已报名</div>
            <div><i class="fa fa-eye"></i> 2354人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>获取门票</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">秋日妆容大师班</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-20</div>
              <div><i class="fa fa-map-marker"></i> 北京美妆学院</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/22/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/24/100/100" alt="主办方头像" class="host-avatar">
            <span>国际美妆协会 主办</span>
          </div>
          
          <div class="event-description">
            由国际知名化妆师亲自授课，教授秋季流行妆容技巧，从底妆到眼妆的完整打造方法，适合美妆爱好者和专业人士。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 238人已报名</div>
            <div><i class="fa fa-eye"></i> 1567人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 风格3：生态绿 - 环保活动管理 -->
    <div class="event-page" id="page3">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">环保活动</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-leaf"></i></button>
          <button class="header-btn"><i class="fa fa-user-o"></i></button>
        </div>
      </div>
      
      <div class="event-toolbar">
        <div class="toolbar-search">
          <i class="fa fa-search"></i>
          <input type="text" placeholder="搜索环保活动...">
        </div>
        <button class="create-btn">
          <i class="fa fa-plus"></i>
          <span>发起</span>
        </button>
      </div>
      
      <div class="category-bar">
        <div class="category-tabs">
          <div class="category-tab active">全部</div>
          <div class="category-tab">植树</div>
          <div class="category-tab">清洁</div>
          <div class="category-tab">讲座</div>
          <div class="category-tab">市集</div>
          <div class="category-tab">培训</div>
        </div>
      </div>
      
      <div class="event-list">
        <div class="refresh-control">
          <i class="fa fa-refresh"></i>
          <span>下拉刷新</span>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">城市公园植树活动</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-22</div>
              <div><i class="fa fa-map-marker"></i> 城市中央公园</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/119/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/118/100/100" alt="主办方头像" class="host-avatar">
            <span>绿色未来协会 主办</span>
          </div>
          
          <div class="event-description">
            秋季植树活动，我们将在城市公园种植100棵新树苗，改善城市生态环境。活动提供所有工具和树苗，欢迎家庭和个人参与。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 156人已报名</div>
            <div><i class="fa fa-eye"></i> 428人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-hand-paper-o"></i>
              <span>我要参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">可持续生活工作坊</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-28</div>
              <div><i class="fa fa-map-marker"></i> 社区活动中心</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/120/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/493/100/100" alt="主办方头像" class="host-avatar">
            <span>可持续发展联盟 主办</span>
          </div>
          
          <div class="event-description">
            学习如何在日常生活中减少浪费、节约能源和水资源，包含垃圾分类指导、旧物改造和环保清洁用品制作等实用内容。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 87人已报名</div>
            <div><i class="fa fa-eye"></i> 235人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-hand-paper-o"></i>
              <span>我要参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 风格4：温暖橙 - 美食活动管理 -->
    <div class="event-page" id="page4">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">美食活动</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-cutlery"></i></button>
          <button class="header-btn"><i class="fa fa-bookmark-o"></i></button>
        </div>
      </div>
      
      <div class="event-toolbar">
        <div class="toolbar-search">
          <i class="fa fa-search"></i>
          <input type="text" placeholder="搜索美食活动...">
        </div>
        <button class="create-btn">
          <i class="fa fa-plus"></i>
          <span>发起</span>
        </button>
      </div>
      
      <div class="category-bar">
        <div class="category-tabs">
          <div class="category-tab active">全部</div>
          <div class="category-tab">烹饪课</div>
          <div class="category-tab">品鉴会</div>
          <div class="category-tab">美食节</div>
          <div class="category-tab">市集</div>
          <div class="category-tab">讲座</div>
        </div>
      </div>
      
      <div class="event-list">
        <div class="refresh-control">
          <i class="fa fa-refresh"></i>
          <span>下拉刷新</span>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">意大利美食烹饪工作坊</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-21</div>
              <div><i class="fa fa-map-marker"></i> 味觉厨艺学校</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/292/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/493/100/100" alt="主办方头像" class="host-avatar">
            <span>国际美食协会 主办</span>
          </div>
          
          <div class="event-description">
            由意大利籍主厨亲授正宗意大利面和披萨制作技巧，从面团准备到酱料调配，让你在家也能做出餐厅级别的意大利美食。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 42人已报名</div>
            <div><i class="fa fa-eye"></i> 289人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-cutlery"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">秋季精酿啤酒品鉴会</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-28</div>
              <div><i class="fa fa-map-marker"></i> 城市精酿酒吧</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/431/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/1061/100/100" alt="主办方头像" class="host-avatar">
            <span>精酿爱好者联盟 主办</span>
          </div>
          
          <div class="event-description">
            品尝6种秋季限定精酿啤酒，了解啤酒酿造工艺和品鉴技巧，搭配特色下酒小食，适合啤酒爱好者参与（需年满18岁）。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 68人已报名</div>
            <div><i class="fa fa-eye"></i> 176人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-glass"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 风格5：梦幻紫 - 艺术活动管理 -->
    <div class="event-page" id="page5">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">艺术活动</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-paint-brush"></i></button>
          <button class="header-btn"><i class="fa fa-heart-o"></i></button>
        </div>
      </div>
      
      <div class="event-toolbar">
        <div class="toolbar-search">
          <i class="fa fa-search"></i>
          <input type="text" placeholder="搜索艺术活动...">
        </div>
        <button class="create-btn">
          <i class="fa fa-plus"></i>
          <span>发起</span>
        </button>
      </div>
      
      <div class="category-bar">
        <div class="category-tabs">
          <div class="category-tab active">全部</div>
          <div class="category-tab">展览</div>
          <div class="category-tab">工作坊</div>
          <div class="category-tab">演出</div>
          <div class="category-tab">讲座</div>
          <div class="category-tab">交流会</div>
        </div>
      </div>
      
      <div class="event-list">
        <div class="refresh-control">
          <i class="fa fa-refresh"></i>
          <span>下拉刷新</span>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">当代艺术装置展</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-15至30日</div>
              <div><i class="fa fa-map-marker"></i> 现代艺术博物馆</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/160/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/160/100/100" alt="主办方头像" class="host-avatar">
            <span>现代艺术基金会 主办</span>
          </div>
          
          <div class="event-description">
            汇集国内外20位知名艺术家的装置艺术作品，探索空间、光影与材质的关系，每日有艺术家导览和互动环节。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 753人已报名</div>
            <div><i class="fa fa-eye"></i> 1892人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>购票参观</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">创意插画工作坊</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-22</div>
              <div><i class="fa fa-map-marker"></i> 创意空间工作室</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/96/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/160/100/100" alt="主办方头像" class="host-avatar">
            <span>插画师协会 主办</span>
          </div>
          
          <div class="event-description">
            由知名插画师教授创意插画技巧，适合初学者和有一定基础的爱好者，工作坊提供所有绘画材料，完成的作品可带回家。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 36人已报名</div>
            <div><i class="fa fa-eye"></i> 156人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-pencil"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 风格6：商务黑 - 商业活动管理 -->
    <div class="event-page" id="page6">
      <div class="page-header">
        <button class="header-back"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">商业活动</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-briefcase"></i></button>
          <button class="header-btn"><i class="fa fa-user"></i></button>
        </div>
      </div>
      
      <div class="event-toolbar">
        <div class="toolbar-search">
          <i class="fa fa-search"></i>
          <input type="text" placeholder="搜索商业活动...">
        </div>
        <button class="create-btn">
          <i class="fa fa-plus"></i>
          <span>创建</span>
        </button>
      </div>
      
      <div class="category-bar">
        <div class="category-tabs">
          <div class="category-tab active">全部</div>
          <div class="category-tab">峰会</div>
          <div class="category-tab">论坛</div>
          <div class="category-tab">路演</div>
          <div class="category-tab">培训</div>
          <div class="category-tab">交流会</div>
        </div>
      </div>
      
      <div class="event-list">
        <div class="refresh-control">
          <i class="fa fa-refresh"></i>
          <span>下拉刷新</span>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">2023科技创新峰会</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-25至26日</div>
              <div><i class="fa fa-map-marker"></i> 国际会议中心</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/180/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/1005/100/100" alt="主办方头像" class="host-avatar">
            <span>科技创新联盟 主办</span>
          </div>
          
          <div class="event-description">
            汇聚行业领袖、投资人和创业者，探讨科技创新趋势与商业机会，包含主题演讲、圆桌讨论、项目对接和展览展示等环节。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 1250人已报名</div>
            <div><i class="fa fa-eye"></i> 3240人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
        
        <div class="event-item">
          <div class="slide-delete">
            <i class="fa fa-trash"></i>
          </div>
          
          <div class="event-header">
            <div class="event-title">创业融资路演活动</div>
            <div class="event-meta">
              <div><i class="fa fa-calendar"></i> 2023-10-20</div>
              <div><i class="fa fa-map-marker"></i> 创业孵化中心</div>
            </div>
          </div>
          
          <div class="event-media">
            <img src="https://picsum.photos/id/366/800/400" alt="活动图片" class="event-image">
          </div>
          
          <div class="event-host">
            <img src="https://picsum.photos/id/1005/100/100" alt="主办方头像" class="host-avatar">
            <span>风险投资协会 主办</span>
          </div>
          
          <div class="event-description">
            为创业项目提供展示和融资对接的平台，10个精选项目将进行现场路演，30+投资机构代表将出席，并有一对一洽谈环节。
          </div>
          
          <div class="event-stats">
            <div><i class="fa fa-user"></i> 320人已报名</div>
            <div><i class="fa fa-eye"></i> 856人感兴趣</div>
          </div>
          
          <div class="event-actions">
            <button class="event-btn join-btn">
              <i class="fa fa-ticket"></i>
              <span>报名参加</span>
            </button>
            <button class="event-btn share-btn">
              <i class="fa fa-share"></i>
              <span>分享</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 当前状态
    let currentStyle = 1;
    let startX = 0;
    let currentX = 0;
    let isDragging = false;
    let currentItem = null;
    let refreshState = 0; // 0: 正常, 1: 下拉中, 2: 刷新中
    
    // DOM元素
    const switcherToggle = document.querySelector('.switcher-toggle');
    const switcher = document.querySelector('.style-switcher');
    const switcherClose = document.querySelector('.switcher-close');
    const switcherOptions = document.querySelectorAll('.switcher-option');
    const eventPages = {
      1: document.getElementById('page1'),
      2: document.getElementById('page2'),
      3: document.getElementById('page3'),
      4: document.getElementById('page4'),
      5: document.getElementById('page5'),
      6: document.getElementById('page6')
    };
    const bodyElement = document.body;
    const eventLists = document.querySelectorAll('.event-list');
    const refreshControls = document.querySelectorAll('.refresh-control');
    
    // 初始化
    function init() {
      // 切换器控制
      switcherToggle.addEventListener('click', toggleSwitcher);
      switcherClose.addEventListener('click', toggleSwitcher);
      
      // 切换样式
      switcherOptions.forEach(option => {
        option.addEventListener('click', function() {
          const style = parseInt(this.getAttribute('data-style'));
          switchStyle(style);
          toggleSwitcher();
        });
      });
      
      // 初始化分类标签
      initCategoryTabs();
      
      // 初始化活动项交互
      initEventInteractions();
      
      // 初始化下拉刷新
      initPullToRefresh();
      
      // 初始化按钮事件
      initButtons();
    }
    
    // 切换样式选择器显示/隐藏
    function toggleSwitcher() {
      switcher.classList.toggle('hidden');
    }
    
    // 初始化分类标签切换
    function initCategoryTabs() {
      document.querySelectorAll('.category-tab').forEach(tab => {
        tab.addEventListener('click', function() {
          // 移除同组所有标签的active类
          const tabContainer = this.parentElement;
          tabContainer.querySelectorAll('.category-tab').forEach(item => {
            item.classList.remove('active');
          });
          
          // 给当前点击的标签添加active类并添加动画
          this.classList.add('active');
          this.style.transform = 'scale(1.1)';
          setTimeout(() => {
            this.style.transform = 'scale(1)';
          }, 200);
        });
      });
    }
    
    // 初始化活动项交互
    function initEventInteractions() {
      document.querySelectorAll('.event-item').forEach(item => {
        // 滑动删除功能
        item.addEventListener('touchstart', handleTouchStart);
        item.addEventListener('touchmove', handleTouchMove);
        item.addEventListener('touchend', handleTouchEnd);
        
        // 鼠标事件（用于桌面预览）
        item.addEventListener('mousedown', handleMouseDown);
        item.addEventListener('mousemove', handleMouseMove);
        item.addEventListener('mouseup', handleMouseUp);
        item.addEventListener('mouseleave', handleMouseUp);
      });
    }
    
    // 触摸开始事件
    function handleTouchStart(e) {
      startX = e.touches[0].clientX;
      currentX = startX;
      isDragging = true;
      currentItem = this;
      
      // 重置滑动状态
      const slideDelete = this.querySelector('.slide-delete');
      slideDelete.classList.remove('active');
      this.style.transform = 'translateX(0)';
    }
    
    // 触摸移动事件
    function handleTouchMove(e) {
      if (!isDragging) return;
      
      currentX = e.touches[0].clientX;
      const diffX = currentX - startX;
      
      // 只允许向左滑动
      if (diffX < 0) {
        const slideDistance = Math.min(-diffX, 80);
        currentItem.style.transform = `translateX(-${slideDistance}px)`;
        
        // 显示删除按钮
        const slideDelete = currentItem.querySelector('.slide-delete');
        if (slideDistance > 40) {
          slideDelete.classList.add('active');
        } else {
          slideDelete.classList.remove('active');
        }
      }
    }
    
    // 触摸结束事件
    function handleTouchEnd() {
      if (!isDragging) return;
      
      isDragging = false;
      const diffX = currentX - startX;
      const slideDelete = currentItem.querySelector('.slide-delete');
      
      // 判断是否需要完全显示删除按钮
      if (diffX < -40) {
        currentItem.style.transform = 'translateX(-80px)';
        slideDelete.classList.add('active');
      } else {
        currentItem.style.transform = 'translateX(0)';
        slideDelete.classList.remove('active');
      }
      
      // 添加删除按钮点击事件
      slideDelete.addEventListener('click', function() {
        if (confirm('确定要删除这个活动吗？')) {
          currentItem.style.height = currentItem.offsetHeight + 'px';
          currentItem.style.overflow = 'hidden';
          currentItem.style.transition = 'all 0.3s ease';
          currentItem.style.transform = 'translateX(100%)';
          
          setTimeout(() => {
            currentItem.remove();
          }, 300);
        }
      });
    }
    
    // 鼠标按下事件（桌面预览）
    function handleMouseDown(e) {
      startX = e.clientX;
      currentX = startX;
      isDragging = true;
      currentItem = this;
      
      // 阻止默认行为以避免文本选择
      e.preventDefault();
      
      // 重置滑动状态
      const slideDelete = this.querySelector('.slide-delete');
      slideDelete.classList.remove('active');
      this.style.transform = 'translateX(0)';
    }
    
    // 鼠标移动事件（桌面预览）
    function handleMouseMove(e) {
      if (!isDragging) return;
      
      currentX = e.clientX;
      const diffX = currentX - startX;
      
      // 只允许向左滑动
      if (diffX < 0) {
        const slideDistance = Math.min(-diffX, 80);
        currentItem.style.transform = `translateX(-${slideDistance}px)`;
        
        // 显示删除按钮
        const slideDelete = currentItem.querySelector('.slide-delete');
        if (slideDistance > 40) {
          slideDelete.classList.add('active');
        } else {
          slideDelete.classList.remove('active');
        }
      }
    }
    
    // 鼠标释放事件（桌面预览）
    function handleMouseUp() {
      if (!isDragging) return;
      
      isDragging = false;
      const diffX = currentX - startX;
      const slideDelete = currentItem.querySelector('.slide-delete');
      
      // 判断是否需要完全显示删除按钮
      if (diffX < -40) {
        currentItem.style.transform = 'translateX(-80px)';
        slideDelete.classList.add('active');
      } else {
        currentItem.style.transform = 'translateX(0)';
        slideDelete.classList.remove('active');
      }
    }
    
    // 初始化下拉刷新
    function initPullToRefresh() {
      eventLists.forEach((list, index) => {
        let startY = 0;
        let currentY = 0;
        let isPulling = false;
        const refreshControl = refreshControls[index];
        
        list.addEventListener('touchstart', function(e) {
          // 只有在列表顶部时才能下拉刷新
          if (list.scrollTop <= 0) {
            startY = e.touches[0].clientY;
            currentY = startY;
            isPulling = true;
            refreshState = 0;
          }
        });
        
        list.addEventListener('touchmove', function(e) {
          if (!isPulling || refreshState === 2) return;
          
          currentY = e.touches[0].clientY;
          const diffY = currentY - startY;
          
          // 只允许向下拉动
          if (diffY > 0) {
            // 阻止页面滚动
            e.preventDefault();
            
            refreshState = 1;
            const pullDistance = Math.min(diffY, 80);
            refreshControl.style.height = pullDistance + 'px';
            
            // 改变刷新提示文本
            if (pullDistance > 50) {
              refreshControl.innerHTML = '<i class="fa fa-refresh refresh-spinner"></i><span>松开刷新</span>';
            } else {
              refreshControl.innerHTML = '<i class="fa fa-refresh"></i><span>下拉刷新</span>';
            }
          }
        });
        
        list.addEventListener('touchend', function() {
          if (!isPulling || refreshState === 2) return;
          
          isPulling = false;
          const diffY = currentY - startY;
          
          if (diffY > 50) {
            // 执行刷新
            refreshState = 2;
            refreshControl.innerHTML = '<i class="fa fa-refresh refresh-spinner"></i><span>刷新中...</span>';
            
            // 模拟刷新过程
            setTimeout(() => {
              refreshControl.style.height = '50px';
              refreshControl.innerHTML = '<i class="fa fa-check"></i><span>刷新成功</span>';
              
              // 恢复正常状态
              setTimeout(() => {
                refreshControl.style.height = '50px';
                refreshControl.innerHTML = '<i class="fa fa-refresh"></i><span>下拉刷新</span>';
                refreshState = 0;
              }, 1000);
              
              // 添加新活动
              addNewEventItem(list);
            }, 1500);
          } else {
            // 未达到刷新条件，恢复原状
            refreshControl.style.height = '50px';
            refreshState = 0;
          }
        });
      });
    }
    
    // 添加新活动项
    function addNewEventItem(list) {
      // 创建新活动元素
      const newItem = document.createElement('div');
      newItem.className = 'event-item';
      newItem.style.opacity = '0';
      newItem.style.transform = 'translateY(-20px)';
      newItem.style.transition = 'all 0.3s ease';
      
      // 随机选择内容
      const imageIds = [1, 2, 3, 21, 22, 119, 120, 292, 431, 160, 96, 180, 366];
      const randomImageId = imageIds[Math.floor(Math.random() * imageIds.length)];
      const hostIds = [64, 91, 26, 65, 24, 118, 493, 1061, 160, 1005];
      const randomHostId = hostIds[Math.floor(Math.random() * hostIds.length)];
      const titles = [
        "行业创新论坛",
        "创意设计工作坊",
        "可持续发展研讨会",
        "未来科技趋势讲座",
        "跨界交流酒会"
      ];
      const randomTitle = titles[Math.floor(Math.random() * titles.length)];
      const hosts = [
        "行业协会",
        "创新中心",
        "专业联盟",
        "文化基金会",
        "企业发展部"
      ];
      const randomHost = hosts[Math.floor(Math.random() * hosts.length)];
      
      newItem.innerHTML = `
        <div class="slide-delete">
          <i class="fa fa-trash"></i>
        </div>
        
        <div class="event-header">
          <div class="event-title">${randomTitle}</div>
          <div class="event-meta">
            <div><i class="fa fa-calendar"></i> 2023-10-30</div>
            <div><i class="fa fa-map-marker"></i> 国际会展中心</div>
          </div>
        </div>
        
        <div class="event-media">
          <img src="https://picsum.photos/id/${randomImageId}/800/400" alt="活动图片" class="event-image">
        </div>
        
        <div class="event-host">
          <img src="https://picsum.photos/id/${randomHostId}/100/100" alt="主办方头像" class="host-avatar">
          <span>${randomHost} 主办</span>
        </div>
        
        <div class="event-description">
          这是一场精彩的新活动，汇聚行业精英，探讨前沿趋势，提供交流与合作的平台，欢迎感兴趣的朋友参加。
        </div>
        
        <div class="event-stats">
          <div><i class="fa fa-user"></i> 42人已报名</div>
          <div><i class="fa fa-eye"></i> 156人感兴趣</div>
        </div>
        
        <div class="event-actions">
          <button class="event-btn join-btn">
            <i class="fa fa-ticket"></i>
            <span>报名参加</span>
          </button>
          <button class="event-btn share-btn">
            <i class="fa fa-share"></i>
            <span>分享</span>
          </button>
        </div>
      `;
      
      // 添加到列表顶部
      const firstChild = list.querySelector('.event-item');
      if (firstChild) {
        list.insertBefore(newItem, firstChild);
      } else {
        list.appendChild(newItem);
      }
      
      // 添加动画效果
      setTimeout(() => {
        newItem.style.opacity = '1';
        newItem.style.transform = 'translateY(0)';
      }, 50);
      
      // 绑定事件
      newItem.addEventListener('touchstart', handleTouchStart);
      newItem.addEventListener('touchmove', handleTouchMove);
      newItem.addEventListener('touchend', handleTouchEnd);
      newItem.addEventListener('mousedown', handleMouseDown);
      newItem.addEventListener('mousemove', handleMouseMove);
      newItem.addEventListener('mouseup', handleMouseUp);
      newItem.addEventListener('mouseleave', handleMouseUp);
      
      // 初始化按钮事件
      initButtonEvents(newItem);
    }
    
    // 初始化按钮事件
    function initButtons() {
      document.querySelectorAll('.event-item').forEach(item => {
        initButtonEvents(item);
      });
    }
    
    // 为单个活动项初始化按钮事件
    function initButtonEvents(item) {
      // 返回按钮
      const backButtons = item.closest('.event-page')?.querySelector('.header-back');
      if (backButtons) {
        backButtons.addEventListener('click', function() {
          alert('返回上一页');
        });
      }
      
      // 创建/发起按钮
      const createButtons = item.closest('.event-page')?.querySelector('.create-btn');
      if (createButtons) {
        createButtons.addEventListener('click', function() {
          alert('创建新活动');
        });
      }
      
      // 报名/参加按钮
      const joinButton = item.querySelector('.join-btn');
      if (joinButton) {
        joinButton.addEventListener('click', function(e) {
          e.stopPropagation();
          if (this.innerHTML.includes('已报名')) {
            this.innerHTML = '<i class="fa fa-ticket"></i><span>报名参加</span>';
            alert('已取消报名');
          } else {
            this.innerHTML = '<i class="fa fa-check"></i><span>已报名</span>';
            alert('报名成功！');
          }
        });
      }
      
      // 分享按钮
      const shareButton = item.querySelector('.share-btn');
      if (shareButton) {
        shareButton.addEventListener('click', function(e) {
          e.stopPropagation();
          alert('分享功能：可以分享到微信、微博等平台');
        });
      }
    }
    
    // 关闭所有页面
    function closeAllPages() {
      Object.values(eventPages).forEach(page => {
        page.classList.remove('active');
      });
    }
    
    // 切换样式
    function switchStyle(style) {
      // 移除所有样式类
      bodyElement.classList.remove('style-1', 'style-2', 'style-3', 'style-4', 'style-5', 'style-6');
      
      // 添加当前样式类
      bodyElement.classList.add(`style-${style}`);
      
      // 更新当前样式
      currentStyle = style;
      
      // 更新切换器选中状态
      switcherOptions.forEach(option => {
        option.classList.remove('active');
        if (parseInt(option.getAttribute('data-style')) === style) {
          option.classList.add('active');
        }
      });
      
      // 显示对应页面
      closeAllPages();
      eventPages[style].classList.add('active');
    }
    
    // 键盘导航
    document.addEventListener('keydown', function(e) {
      if (e.key === 'ArrowLeft') {
        let prev = currentStyle - 1;
        if (prev < 1) prev = 6;
        switchStyle(prev);
      } else if (e.key === 'ArrowRight') {
        let next = currentStyle + 1;
        if (next > 6) next = 1;
        switchStyle(next);
      }
    });
    
    // 启动
    init();
  </script>
</body>
</html>
